cdc5d6
@@ -184,9 +184,14 @@
public class MailBinding {
         String contentType = determineContentType(configuration, exchange);
 
         LOG.trace("Using Content-Type {} for MimeMessage: {}", contentType, part);
+        
+        String body = exchange.getIn().getBody(String.class);
+        if (body == null) {
+            body = "";
+        }
 
         // always store content in a byte array data store to avoid various content type and charset issues
-        DataSource ds = new ByteArrayDataSource(exchange.getIn().getBody(String.class), contentType);
+        DataSource ds = new ByteArrayDataSource(body, contentType);
         part.setDataHandler(new DataHandler(ds));
 
         // set the content type header afterwards
